<template>
    <div class="Add">
        <input type="text" v-model="val">
        <button @click="addTask">添加</button>
    </div>
</template>

<script>
export default {
	data () {
		return {
			val: ""
		}
	},
	methods: {
		addTask(){
			console.log(this.val)
			this.$store.commit('todolist/addTask',this.val)
		}
	},
}
</script>

<style lang="stylus">

</style>
